package com.sdms.core;

import java.util.List;

import com.sdms.core.auth.UnauthorisedUserException;

/**
 * Secure Delivery Management System (SDMS)
 * com.sdms.core
 * User: Tharindu Munasinghe
 * Mar 7, 2013 3:29:42 PM
 * Copyright � 2013
 */
public interface IDeliveryManagementSystem
{
	/**
	 * Permission Level - R_VIEW_ITEM
	 * 
	 * @param itemId
	 */
	public DeliveryDetails viewDeliveryDetails( String sessionId, String itemId )  throws UnauthorisedUserException;  

	/**
	 * Permission Level - R_UPDATE_ITEM
	 * 
	 * @param itemId
	 */
	public void updateDeliveryDetails( String sessionId, String itemId ) throws UnauthorisedUserException;
	
	/**
	 * Permission Level - R_ADD_ITEM, R_VIEW_ITEM
	 * 
	 * @param itemId
	 */
	public DeliveryDetails addItemDeliveryAndView( String sessionId, String customerName, String collectFrom, String destination, String itemDesc ) throws UnauthorisedUserException;
	/**
	 * Permission Level - R_ADD_ITEM
	 * 
	 * @param itemId
	 */
	public String addItemDelivery( String sessionId, String customerName, String collectFrom, String destination, String itemDesc ) throws UnauthorisedUserException;

	/**
	 * Permission Level - R_CANCEL_DELIVERY
	 * 
	 * @param itemId
	 */
	public DeliveryDetails cancelItemDelivery( String sessionId, String itemId ) throws UnauthorisedUserException;
	
	/**
	 * Permission Level - R_ADD_USER
	 * 
	 * @param userName
	 */
	public void addNewUser(String sessionId, String userName ) throws UnauthorisedUserException;

	/**
	 * Permission Level - R_REMOVE_USER
	 * 
	 * @param userName
	 */
	public void removeUser( String sessionId, String userName ) throws UnauthorisedUserException;
	
	public List<DeliveryDetails> viewDeliveryDetails( String sessionId ) throws UnauthorisedUserException;

}
